#pragma once

#import "msscript.ocx"

class COleClass
{
public:
	COleClass()
	{
		static BOOL bFirstInstance = TRUE;
		if (bFirstInstance)
		{
			CoInitialize(NULL);
			bFirstInstance = FALSE;
		}
	}
};

class CJsEngine: public COleClass
{
public:
	CJsEngine(void);
	~CJsEngine(void);
	int GetJsonInt(LPCTSTR lpszJson, LPCTSTR lpszKey);
	unsigned int GetJsonUint(LPCTSTR lpszJson, LPCTSTR lpszKey);
	CString GetJsonStr(LPCTSTR lpszJson, LPCTSTR lpszKey);

public:
	MSScriptControl::IScriptControlPtr m_pScriptControl; 
};
